package com.study.practice.schedule;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

/**
 * @Description : schedule测试
 * @Version : V1.0.0
 * @Date : 2021/12/1 11:22
 */
@Component
@Slf4j
public class ScheduleTestTwo {
//    @Scheduled(cron = "0/10 * * * * *")
    public void second() throws InterruptedException {
        log.info("Second scheduled task is running... ...");
        TimeUnit.SECONDS.sleep(5);
    }
}
